home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12816 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 62 6c | 61 63 6b 2e 77 65 65 67 |Path: bl|ack.weeg|
|00000010| 2e 75 69 6f 77 61 2e 65 | 64 75 21 72 6f 62 69 6e |.uiowa.e|du!robin|
|00000020| 73 6f 6e 0a 46 72 6f 6d | 3a 20 54 68 65 20 41 6d |son.From|: The Am|
|00000030| 6f 72 70 68 6f 75 73 20 | 4d 61 73 73 20 3c 72 6f |orphous |Mass <ro|
|00000040| 62 69 6e 73 6f 6e 40 62 | 6c 75 65 2e 77 65 65 67 |binson@b|lue.weeg|
|00000050| 2e 75 69 6f 77 61 2e 65 | 64 75 3e 0a 4e 65 77 73 |.uiowa.e|du>.News|
|00000060| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 6c 61 6e |groups: |comp.lan|
|00000070| 67 2e 63 0a 53 75 62 6a | 65 63 74 3a 20 52 65 3a |g.c.Subj|ect: Re:|
|00000080| 20 68 65 6c 70 20 77 69 | 74 68 20 73 74 72 63 6d | help wi|th strcm|
|00000090| 70 0a 44 61 74 65 3a 20 | 54 75 65 2c 20 32 20 41 |p.Date: |Tue, 2 A|
|000000a0| 70 72 20 31 39 39 36 20 | 31 36 3a 35 36 3a 34 32 |pr 1996 |16:56:42|
|000000b0| 20 2d 30 36 30 30 0a 4f | 72 67 61 6e 69 7a 61 74 | -0600.O|rganizat|
|000000c0| 69 6f 6e 3a 20 55 6e 69 | 76 65 72 73 69 74 79 20 |ion: Uni|versity |
|000000d0| 6f 66 20 49 6f 77 61 2c | 20 49 6f 77 61 20 43 69 |of Iowa,| Iowa Ci|
|000000e0| 74 79 2c 20 49 41 2c 20 | 55 53 41 0a 44 69 73 74 |ty, IA, |USA.Dist|
|000000f0| 72 69 62 75 74 69 6f 6e | 3a 20 77 6f 72 6c 64 0a |ribution|: world.|
|00000100| 4d 65 73 73 61 67 65 2d | 49 44 3a 20 3c 50 69 6e |Message-|ID: <Pin|
|00000110| 65 2e 41 33 32 2e 33 2e | 39 31 2e 39 36 30 34 30 |e.A32.3.|91.96040|
|00000120| 32 31 36 34 37 34 32 2e | 38 38 34 35 38 42 2d 31 |2164742.|88458B-1|
|00000130| 30 30 30 30 30 40 62 6c | 61 63 6b 2e 77 65 65 67 |00000@bl|ack.weeg|
|00000140| 2e 75 69 6f 77 61 2e 65 | 64 75 3e 0a 52 65 66 65 |.uiowa.e|du>.Refe|
|00000150| 72 65 6e 63 65 73 3a 20 | 3c 34 6a 70 69 65 6b 24 |rences: |<4jpiek$|
|00000160| 6c 70 36 40 62 6c 61 7a | 65 2e 63 73 2e 6a 68 75 |lp6@blaz|e.cs.jhu|
|00000170| 2e 65 64 75 3e 20 3c 34 | 6a 73 35 70 37 24 71 34 |.edu> <4|js5p7$q4|
|00000180| 34 40 68 6f 62 62 65 73 | 2e 73 63 6f 2e 43 4f 4d |4@hobbes|.sco.COM|
|00000190| 3e 0a 4e 4e 54 50 2d 50 | 6f 73 74 69 6e 67 2d 48 |>.NNTP-P|osting-H|
|000001a0| 6f 73 74 3a 20 62 6c 61 | 63 6b 2e 77 65 65 67 2e |ost: bla|ck.weeg.|
|000001b0| 75 69 6f 77 61 2e 65 64 | 75 0a 4d 69 6d 65 2d 56 |uiowa.ed|u.Mime-V|
|000001c0| 65 72 73 69 6f 6e 3a 20 | 31 2e 30 0a 43 6f 6e 74 |ersion: |1.0.Cont|
|000001d0| 65 6e 74 2d 54 79 70 65 | 3a 20 54 45 58 54 2f 50 |ent-Type|: TEXT/P|
|000001e0| 4c 41 49 4e 3b 20 63 68 | 61 72 73 65 74 3d 55 53 |LAIN; ch|arset=US|
|000001f0| 2d 41 53 43 49 49 0a 58 | 2d 53 65 6e 64 65 72 3a |-ASCII.X|-Sender:|
|00000200| 20 72 6f 62 69 6e 73 6f | 6e 40 62 6c 61 63 6b 2e | robinso|n@black.|
|00000210| 77 65 65 67 2e 75 69 6f | 77 61 2e 65 64 75 0a 49 |weeg.uio|wa.edu.I|
|00000220| 6e 2d 52 65 70 6c 79 2d | 54 6f 3a 20 3c 34 6a 73 |n-Reply-|To: <4js|
|00000230| 35 70 37 24 71 34 34 40 | 68 6f 62 62 65 73 2e 73 |5p7$q44@|hobbes.s|
|00000240| 63 6f 2e 43 4f 4d 3e 20 | 0a 0a 4f 6e 20 32 20 41 |co.COM> |..On 2 A|
|00000250| 70 72 20 31 39 39 36 2c | 20 4d 69 63 68 61 65 6c |pr 1996,| Michael|
|00000260| 20 44 61 76 69 64 73 6f | 6e 20 77 72 6f 74 65 3a | Davidso|n wrote:|
|00000270| 0a 0a 3e 20 59 6f 75 20 | 63 6f 75 6c 64 20 66 69 |..> You |could fi|
|00000280| 78 20 74 68 69 73 20 62 | 79 20 72 65 77 72 69 74 |x this b|y rewrit|
|00000290| 69 6e 67 20 79 6f 75 72 | 20 6c 6f 6f 70 20 74 68 |ing your| loop th|
|000002a0| 75 73 3a 0a 3e 20 0a 3e | 20 20 20 20 20 77 68 69 |us:.> .>| whi|
|000002b0| 6c 65 20 28 66 70 20 3d | 20 66 67 65 74 73 28 64 |le (fp =| fgets(d|
|000002c0| 61 74 61 2c 20 34 30 2c | 20 68 61 6e 64 6c 65 29 |ata, 40,| handle)|
|000002d0| 29 20 7b 0a 0a 20 20 46 | 6f 72 20 74 68 65 20 70 |) {.. F|or the p|
|000002e0| 75 72 70 6f 73 65 73 20 | 6f 66 20 6d 61 69 6e 74 |urposes |of maint|
|000002f0| 61 69 6e 61 62 69 6c 69 | 74 79 2c 20 74 68 69 73 |ainabili|ty, this|
|00000300| 20 69 73 20 62 65 74 74 | 65 72 20 65 78 70 72 65 | is bett|er expre|
|00000310| 73 73 65 64 20 61 73 20 | 65 69 74 68 65 72 0a 0a |ssed as |either..|
|00000320| 23 64 65 66 69 6e 65 20 | 4d 41 58 5f 44 41 54 41 |#define |MAX_DATA|
|00000330| 5f 53 49 5a 45 20 34 30 | 0a 2f 2a 20 2e 2e 2e 20 |_SIZE 40|./* ... |
|00000340| 2a 2f 0a 77 68 69 6c 65 | 20 28 66 70 20 3d 20 66 |*/.while| (fp = f|
|00000350| 67 65 74 73 28 64 61 74 | 61 2c 20 4d 41 58 5f 44 |gets(dat|a, MAX_D|
|00000360| 41 54 41 5f 53 49 5a 45 | 2c 20 68 61 6e 64 6c 65 |ATA_SIZE|, handle|
|00000370| 29 29 20 2f 2a 20 2e 2e | 2e 20 2a 2f 0a 0a 20 20 |)) /* ..|. */.. |
|00000380| 6f 72 2c 20 69 66 20 64 | 61 74 61 20 69 73 20 61 |or, if d|ata is a|
|00000390| 6e 20 61 72 72 61 79 2c | 0a 0a 77 68 69 6c 65 20 |n array,|..while |
|000003a0| 28 66 70 20 3d 20 66 67 | 65 74 73 28 64 61 74 61 |(fp = fg|ets(data|
|000003b0| 2c 20 73 69 7a 65 6f 66 | 20 64 61 74 61 2c 20 68 |, sizeof| data, h|
|000003c0| 61 6e 64 6c 65 29 29 20 | 2f 2a 20 2e 2e 2e 20 2a |andle)) |/* ... *|
|000003d0| 2f 0a 0a 20 20 54 68 65 | 20 6c 61 74 74 65 72 20 |/.. The| latter |
|000003e0| 68 61 73 20 74 68 65 20 | 64 69 73 61 64 76 61 6e |has the |disadvan|
|000003f0| 74 61 67 65 20 6f 66 20 | 72 65 71 75 69 72 69 6e |tage of |requirin|
|00000400| 67 20 74 68 61 74 20 64 | 61 74 61 20 62 65 20 61 |g that d|ata be a|
|00000410| 6e 20 61 72 72 61 79 2c | 20 62 75 74 20 0a 74 68 |n array,| but .th|
|00000420| 65 20 61 64 76 61 6e 74 | 61 67 65 20 69 66 20 79 |e advant|age if y|
|00000430| 6f 75 20 63 68 61 6e 67 | 65 20 74 68 65 20 73 69 |ou chang|e the si|
|00000440| 7a 65 20 6f 66 20 74 68 | 65 20 61 72 72 61 79 20 |ze of th|e array |
|00000450| 74 68 65 20 73 65 63 6f | 6e 64 20 70 61 72 61 6d |the seco|nd param|
|00000460| 65 74 65 72 20 0a 77 69 | 6c 6c 20 61 75 74 6f 6d |eter .wi|ll autom|
|00000470| 61 74 69 63 61 6c 6c 79 | 20 63 6f 6e 66 6f 72 6d |atically| conform|
|00000480| 20 74 6f 20 74 68 65 20 | 6e 65 77 20 73 69 7a 65 | to the |new size|
|00000490| 20 77 68 65 6e 20 79 6f | 75 20 72 65 63 6f 6d 70 | when yo|u recomp|
|000004a0| 69 6c 65 2e 20 20 54 68 | 65 73 65 20 74 77 6f 20 |ile. Th|ese two |
|000004b0| 0a 6d 65 74 68 6f 64 73 | 20 63 61 6e 20 62 65 20 |.methods| can be |
|000004c0| 63 6f 6d 62 69 6e 65 64 | 20 69 6e 74 6f 3a 0a 0a |combined| into:..|
|000004d0| 23 64 65 66 69 6e 65 20 | 4d 41 58 5f 44 41 54 41 |#define |MAX_DATA|
|000004e0| 5f 53 49 5a 45 20 34 30 | 0a 2f 2a 20 2e 2e 2e 20 |_SIZE 40|./* ... |
|000004f0| 2a 2f 0a 63 68 61 72 20 | 64 61 74 61 5b 4d 41 58 |*/.char |data[MAX|
|00000500| 5f 44 41 54 41 5f 53 49 | 5a 45 5d 3b 0a 2f 2a 20 |_DATA_SI|ZE];./* |
|00000510| 2e 2e 2e 20 2a 2f 0a 77 | 68 69 6c 65 20 28 66 70 |... */.w|hile (fp|
|00000520| 20 3d 20 66 67 65 74 73 | 28 64 61 74 61 2c 20 73 | = fgets|(data, s|
|00000530| 69 7a 65 6f 66 20 64 61 | 74 61 2c 20 68 61 6e 64 |izeof da|ta, hand|
|00000540| 6c 65 29 29 20 2f 2a 20 | 2e 2e 2e 20 2a 2f 0a 0a |le)) /* |... */..|
|00000550| 20 20 46 57 49 57 2c 20 | 49 20 77 6f 75 6c 64 20 | FWIW, |I would |
|00000560| 70 72 65 66 65 72 20 73 | 6f 6d 65 74 68 69 6e 67 |prefer s|omething|
|00000570| 20 6c 69 6b 65 3a 0a 0a | 23 64 65 66 69 6e 65 20 | like:..|#define |
|00000580| 4d 41 58 5f 44 41 54 41 | 5f 53 49 5a 45 20 33 39 |MAX_DATA|_SIZE 39|
|00000590| 20 2f 2a 20 64 6f 63 75 | 6d 65 6e 74 73 20 6c 65 | /* docu|ments le|
|000005a0| 6e 67 74 68 20 6f 66 20 | 73 74 72 69 6e 67 20 74 |ngth of |string t|
|000005b0| 6f 20 72 65 61 64 20 69 | 6e 20 2a 2f 0a 2f 2a 20 |o read i|n */./* |
|000005c0| 2e 2e 2e 20 2a 2f 0a 63 | 68 61 72 20 64 61 74 61 |... */.c|har data|
|000005d0| 5b 4d 41 58 5f 44 41 54 | 41 5f 53 49 5a 45 20 2b |[MAX_DAT|A_SIZE +|
|000005e0| 20 31 5d 3b 20 2f 2a 20 | 64 6f 63 75 6d 65 6e 74 | 1]; /* |document|
|000005f0| 73 20 61 6c 6c 6f 63 61 | 74 69 6f 6e 20 66 6f 72 |s alloca|tion for|
|00000600| 20 6e 75 6c 6c 20 74 65 | 72 6d 69 6e 61 74 6f 72 | null te|rminator|
|00000610| 20 2a 2f 0a 2f 2a 20 2e | 2e 2e 20 2a 2f 0a 77 68 | */./* .|.. */.wh|
|00000620| 69 6c 65 20 28 66 70 20 | 3d 20 66 67 65 74 73 28 |ile (fp |= fgets(|
|00000630| 64 61 74 61 2c 20 73 69 | 7a 65 6f 66 20 64 61 74 |data, si|zeof dat|
|00000640| 61 2c 20 68 61 6e 64 6c | 65 29 29 20 2f 2a 20 2e |a, handl|e)) /* .|
|00000650| 2e 2e 20 2a 2f 0a 0a 2f | 2a 2a 4a 61 6d 65 73 20 |.. */../|**James |
|00000660| 52 6f 62 69 6e 73 6f 6e | 2a 2a 2a 2a 2a 2a 2a 2a |Robinson|********|
|00000670| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 20 |********|******* |
|00000680| 20 20 20 20 20 20 20 20 | 20 20 20 0a 20 20 22 49 | | . "I|
|00000690| 66 20 61 20 66 61 74 61 | 6c 20 65 72 72 6f 72 20 |f a fata|l error |
|000006a0| 6f 63 63 75 72 73 2c 20 | 74 68 65 20 70 72 6f 67 |occurs, |the prog|
|000006b0| 72 61 6d 20 73 68 6f 75 | 6c 64 20 6e 6f 74 20 62 |ram shou|ld not b|
|000006c0| 65 20 61 6c 6c 6f 77 65 | 64 20 74 6f 20 63 6f 6e |e allowe|d to con|
|000006d0| 74 69 6e 75 65 2e 22 0a | 20 2d 2d 20 4f 72 61 63 |tinue.".| -- Orac|
|000006e0| 6c 65 20 50 72 6f 2a 43 | 20 55 73 65 72 27 73 20 |le Pro*C| User's |
|000006f0| 47 75 69 64 65 20 20 20 | 20 20 20 20 20 20 2a 2a |Guide | **|
|00000700| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 6a 61 6d 65 73 |********|***james|
|00000710| 2d 72 6f 62 69 6e 73 6f | 6e 40 75 69 6f 77 61 2e |-robinso|n@uiowa.|
|00000720| 65 64 75 2a 2a 2f 0a 0a | 0a 0a |edu**/..|.. |
+--------+-------------------------+-------------------------+--------+--------+